Optimal. Leaf size=142 \[ \frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{25 \tan ^3(c+d x)}{12 a^2 d}-\frac{3 i \tan ^2(c+d x)}{a^2 d}+\frac{25 \tan (c+d x)}{4 a^2 d}-\frac{6 i \log (\cos (c+d x))}{a^2 d}-\frac{25 x}{4 a^2}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.226274, antiderivative size = 142, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {3558, 3595, 3528, 3525, 3475} \[ \frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{25 \tan ^3(c+d x)}{12 a^2 d}-\frac{3 i \tan ^2(c+d x)}{a^2 d}+\frac{25 \tan (c+d x)}{4 a^2 d}-\frac{6 i \log (\cos (c+d x))}{a^2 d}-\frac{25 x}{4 a^2}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3558
Rule 3595
Rule 3528
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int \frac{\tan ^6(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac{\int \frac{\tan ^4(c+d x) (-5 a+7 i a \tan (c+d x))}{a+i a \tan (c+d x)} \, dx}{4 a^2}\\ &=\frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2}+\frac{\int \tan ^3(c+d x) \left (-48 i a^2-50 a^2 \tan (c+d x)\right ) \, dx}{8 a^4}\\ &=-\frac{25 \tan ^3(c+d x)}{12 a^2 d}+\frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2}+\frac{\int \tan ^2(c+d x) \left (50 a^2-48 i a^2 \tan (c+d x)\right ) \, dx}{8 a^4}\\ &=-\frac{3 i \tan ^2(c+d x)}{a^2 d}-\frac{25 \tan ^3(c+d x)}{12 a^2 d}+\frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2}+\frac{\int \tan (c+d x) \left (48 i a^2+50 a^2 \tan (c+d x)\right ) \, dx}{8 a^4}\\ &=-\frac{25 x}{4 a^2}+\frac{25 \tan (c+d x)}{4 a^2 d}-\frac{3 i \tan ^2(c+d x)}{a^2 d}-\frac{25 \tan ^3(c+d x)}{12 a^2 d}+\frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2}+\frac{(6 i) \int \tan (c+d x) \, dx}{a^2}\\ &=-\frac{25 x}{4 a^2}-\frac{6 i \log (\cos (c+d x))}{a^2 d}+\frac{25 \tan (c+d x)}{4 a^2 d}-\frac{3 i \tan ^2(c+d x)}{a^2 d}-\frac{25 \tan ^3(c+d x)}{12 a^2 d}+\frac{3 i \tan ^4(c+d x)}{2 a^2 d (1+i \tan (c+d x))}-\frac{\tan ^5(c+d x)}{4 d (a+i a \tan (c+d x))^2}\\ \end{align*}
Mathematica [B] time = 6.4384, size = 882, normalized size = 6.21 \[ \frac{i \sec (c) (\cos (d x)+i \sin (d x))^2 (-\cos (2 c-d x)+\cos (2 c+d x)-i \sin (2 c-d x)+i \sin (2 c+d x)) \sec ^5(c+d x)}{6 d (i \tan (c+d x) a+a)^2}+\frac{\sec (c) (3 \cos (c)-i \sin (c)) \left (\frac{1}{3} \sin (2 c)-\frac{1}{3} i \cos (2 c)\right ) (\cos (d x)+i \sin (d x))^2 \sec ^4(c+d x)}{d (i \tan (c+d x) a+a)^2}-\frac{13 i \sec (c) (\cos (d x)+i \sin (d x))^2 (-\cos (2 c-d x)+\cos (2 c+d x)-i \sin (2 c-d x)+i \sin (2 c+d x)) \sec ^3(c+d x)}{6 d (i \tan (c+d x) a+a)^2}-\frac{25 x \cos (2 c) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{4 (i \tan (c+d x) a+a)^2}-\frac{6 \tan ^{-1}(\tan (d x)) \cos (2 c) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{d (i \tan (c+d x) a+a)^2}+\frac{5 i \cos (2 d x) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{4 d (i \tan (c+d x) a+a)^2}-\frac{3 i \cos (2 c) \log \left (\cos ^2(c+d x)\right ) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{d (i \tan (c+d x) a+a)^2}+\frac{\cos (4 d x) \left (-\frac{1}{16} i \cos (2 c)-\frac{1}{16} \sin (2 c)\right ) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{d (i \tan (c+d x) a+a)^2}-\frac{25 i x \sin (2 c) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{4 (i \tan (c+d x) a+a)^2}-\frac{6 i \tan ^{-1}(\tan (d x)) \sin (2 c) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{d (i \tan (c+d x) a+a)^2}+\frac{3 \log \left (\cos ^2(c+d x)\right ) \sin (2 c) (\cos (d x)+i \sin (d x))^2 \sec ^2(c+d x)}{d (i \tan (c+d x) a+a)^2}+\frac{5 (\cos (d x)+i \sin (d x))^2 \sin (2 d x) \sec ^2(c+d x)}{4 d (i \tan (c+d x) a+a)^2}+\frac{\left (\frac{1}{16} i \sin (2 c)-\frac{1}{16} \cos (2 c)\right ) (\cos (d x)+i \sin (d x))^2 \sin (4 d x) \sec ^2(c+d x)}{d (i \tan (c+d x) a+a)^2}+\frac{x (\cos (d x)+i \sin (d x))^2 (i (6 \cos (2 c)+6 i \sin (2 c)) \tan (c)+6 i \tan (c)+6) \sec ^2(c+d x)}{(i \tan (c+d x) a+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.027, size = 126, normalized size = 0.9 \begin{align*} 4\,{\frac{\tan \left ( dx+c \right ) }{{a}^{2}d}}-{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,{a}^{2}d}}-{\frac{i \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{{a}^{2}d}}+{\frac{{\frac{i}{4}}}{{a}^{2}d \left ( \tan \left ( dx+c \right ) -i \right ) ^{2}}}+{\frac{{\frac{49\,i}{8}}\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{{a}^{2}d}}+{\frac{11}{4\,{a}^{2}d \left ( \tan \left ( dx+c \right ) -i \right ) }}-{\frac{{\frac{i}{8}}\ln \left ( \tan \left ( dx+c \right ) +i \right ) }{{a}^{2}d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.23459, size = 618, normalized size = 4.35 \begin{align*} -\frac{588 \, d x e^{\left (10 i \, d x + 10 i \, c\right )} +{\left (1764 \, d x - 348 i\right )} e^{\left (8 i \, d x + 8 i \, c\right )} +{\left (1764 \, d x - 753 i\right )} e^{\left (6 i \, d x + 6 i \, c\right )} +{\left (588 \, d x - 587 i\right )} e^{\left (4 i \, d x + 4 i \, c\right )} -{\left (-288 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 864 i \, e^{\left (8 i \, d x + 8 i \, c\right )} - 864 i \, e^{\left (6 i \, d x + 6 i \, c\right )} - 288 i \, e^{\left (4 i \, d x + 4 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 51 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i}{48 \,{\left (a^{2} d e^{\left (10 i \, d x + 10 i \, c\right )} + 3 \, a^{2} d e^{\left (8 i \, d x + 8 i \, c\right )} + 3 \, a^{2} d e^{\left (6 i \, d x + 6 i \, c\right )} + a^{2} d e^{\left (4 i \, d x + 4 i \, c\right )}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.79549, size = 218, normalized size = 1.54 \begin{align*} \frac{\frac{6 i e^{- 2 i c} e^{4 i d x}}{a^{2} d} + \frac{12 i e^{- 4 i c} e^{2 i d x}}{a^{2} d} + \frac{26 i e^{- 6 i c}}{3 a^{2} d}}{e^{6 i d x} + 3 e^{- 2 i c} e^{4 i d x} + 3 e^{- 4 i c} e^{2 i d x} + e^{- 6 i c}} - \frac{\left (\begin{cases} 49 x e^{4 i c} - \frac{5 i e^{2 i c} e^{- 2 i d x}}{d} + \frac{i e^{- 4 i d x}}{4 d} & \text{for}\: d \neq 0 \\x \left (49 e^{4 i c} - 10 e^{2 i c} + 1\right ) & \text{otherwise} \end{cases}\right ) e^{- 4 i c}}{4 a^{2}} - \frac{6 i \log{\left (e^{2 i d x} + e^{- 2 i c} \right )}}{a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 4.97304, size = 150, normalized size = 1.06 \begin{align*} -\frac{\frac{6 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{2}} - \frac{294 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{2}} + \frac{3 \,{\left (147 i \, \tan \left (d x + c\right )^{2} + 250 \, \tan \left (d x + c\right ) - 107 i\right )}}{a^{2}{\left (\tan \left (d x + c\right ) - i\right )}^{2}} + \frac{16 \,{\left (a^{4} \tan \left (d x + c\right )^{3} + 3 i \, a^{4} \tan \left (d x + c\right )^{2} - 12 \, a^{4} \tan \left (d x + c\right )\right )}}{a^{6}}}{48 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]